﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Logging
{
    public class SimpleLogRecord
    {
        private DateTime time;
        private string loggerName;
        private SimpleLoggerLevel level;
        private string message;
        private Exception exception;

        public SimpleLogRecord(string loggerName, SimpleLoggerLevel level, string message) : this(loggerName, level, message, null) { }

        public SimpleLogRecord(string loggerName, SimpleLoggerLevel level, string message, Exception exception)
        {
            this.time = DateTime.Now;
            this.loggerName = loggerName;
            this.level = level;
            this.message = message;
            this.exception = exception;
        }

        public DateTime Time
        {
            get
            {
                return time;
            }
        }

        public string LoggerName
        {
            get
            {
                return loggerName;
            }
        }

        public SimpleLoggerLevel Level
        {
            get
            {
                return level;
            }
        }

        public string Message
        {
            get
            {
                return message;
            }
        }

        public Exception Exception
        {
            get
            {
                return exception;
            }
        }
    }
}
